package com.sunlake.spring.main.model.orders.dto;

import lombok.Data;

/**
 * 支付响应DTO
 */
@Data
public class PayOrderResponseDTO {
    private String paymentUrl;      // 支付链接（支付宝等第三方支付）
    private String orderNo;         // 订单号
    private String paymentMethod;    // 支付方式
    private String message;         // 提示信息
    private Boolean needRedirect;   // 是否需要跳转
    
    public static PayOrderResponseDTO balancePay(String orderNo) {
        PayOrderResponseDTO response = new PayOrderResponseDTO();
        response.setOrderNo(orderNo);
        response.setPaymentMethod("BALANCE");
        response.setMessage("余额支付成功");
        response.setNeedRedirect(false);
        return response;
    }
    
    public static PayOrderResponseDTO thirdPartyPay(String orderNo, String paymentUrl) {
        PayOrderResponseDTO response = new PayOrderResponseDTO();
        response.setOrderNo(orderNo);
        response.setPaymentUrl(paymentUrl);
        response.setNeedRedirect(true);
        return response;
    }
}